package com.xitang.common.bean;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("biz_material")
public class BizMaterial extends Model<BizMaterial> {
    @TableId(value = "material_code")
    @ExcelProperty(value = "材料编码", index = 0)
    private String materialCode;
    @ExcelProperty(value = "材料名称", index = 1)
    private String materialName;
    @ExcelProperty(value = "材料颜色", index = 2)
    private String materialColor;
    @ExcelProperty(value = "材料价格", index = 3)
    private Float materialPrice;
    @ExcelProperty(value = "材料图片", index = 4)
    private String materialImg;
    @ExcelProperty(value = "材料描述", index = 5)
    private String materialDesc;
    @ExcelProperty(value = "库存数量", index = 6)
    private String materialNum;
    @ExcelIgnore
    private Integer status = 1;

    @Override
    protected Serializable pkVal() {
        return this.materialCode;
    }
}